/**
 *
 */
package org.jprobe.junit;

/**
 * defines the behavior carried out by
 * any consumer class which carries out tasks that
 * takes long time to process.
 * @author Hussain Al-Mutawa
 * @version 2.0
 * @since 2.0
 */
public interface TimeMeasurable {
	/**
	 * starts the counter for a given operation
	 */
	void startTimeCount();
	/**
	 * stops the time counter at the end of executing a task
	 */
	void stopTimeCount();
	/**
	 * gets the elapsed time in milliseconds to execute
	 * a certain task
	 * @return the time taken to perform a task in ms.
	 */
	long getElapsedTime();
	/**
	 * this method is triggered by {@link #stopTimeCount()}
	 */
	void processCompleted();
	/**
	 * this method is triggered by {@link #startTimeCount()}
	 */
	void processStarted();
	/**
	 * gets the current item being processed
	 * @return the current item
	 */
	String getCurrentItem();
}
